<?php !isset($user['avatar_url']) AND $user['avatar_url'] = ''; ?>

<!--{hook admin_header_nav_start.htm}-->

<div class="dashboard-header">
	<nav class="navbar navbar-expand-lg bg-white fixed-top">
		<a class="navbar-brand" href="index.html"><img style="height: 50px;" src="../view/img/Logo.jpg" /></a>
		<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
			<span class="navbar-toggler-icon"></span>
		</button>
	</nav>
</div>
<!-- <div class="nav-left-sidebar sidebar-dark">
	<div class="menu-list">
		<a class="d-xl-none d-lg-none" href="#">Dashboard</a>
		<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
			<span class="navbar-toggler-icon"></span>
		</button>
		<div class="collapse navbar-collapse" id="navbarNav">
			<ul class="navbar-nav flex-column">
				<li class="nav-divider">
					Menu
				</li>
				<?php foreach ($menu as $k=>$v) { ?>
					<li class="sidebar-list-item">
						<a 
							href="<?php echo $v['url'];?>"
							class="sidebar-link text-muted"
							>
							<i class="<?php echo $v['icon'];?> mr-3 text-gray"></i>
							<span class="text-nowrap"><?php echo $v['text'];?></span>
						</a>
					</li>
				<?php  } ?>
			</ul>
		</div>
	</div>
</div> -->
<div class="nav-left-sidebar sidebar-dark">
	<div class="menu-list">
		<nav class="navbar navbar-expand-lg navbar-light">
			<a class="d-xl-none d-lg-none" href="#">Dashboard</a>
			<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
				<span class="navbar-toggler-icon"></span>
			</button>
			<div class="collapse navbar-collapse" id="navbarNav">
				<ul class="navbar-nav flex-column">
					<li class="nav-divider">
						菜单
					</li>
					<?php $i = 1; ?>
					<?php foreach ($menu as $k=>$v) { ?>
						<li class="nav-item">
							<a class="nav-link" href="#" data-toggle="collapse" aria-expanded="false" data-target="#submenu-<?php echo $i; ?>" aria-controls="submenu-<?php echo $i; ?>"><i class="fa fa-fw <?php echo $v['icon'];?>"></i><?php echo $v['text'];?> <span class="badge badge-success">6</span></a>
							<div id="submenu-<?php echo $i; ?>" class="collapse submenu" style="">
								<ul class="nav flex-column">
									<li class="nav-item">
										<a class="nav-link" href="<?php echo $v['url']; ?>">主页</a>
									</li>
									<?php $ii = 1; ?>
									<?php foreach ($v['tab'] as $tab){ ?>
										<li class="nav-item">
											<a class="nav-link" href="<?php echo $tab['url'] ?>"><?php echo $tab['text'] ?></a>
										</li>
										<?php $ii += 1; ?>
									<?php } ?>
								</ul>
							</div>
						</li>
						<?php $i += 1; ?>
					<?php  } ?>
				</ul>
			</div>
		</nav>
	</div>
</div>
<!--{hook admin_header_nav_footer.htm}-->